package org.jetlinks.test.listener;

import org.jetlinks.test.event.MonoDeferEvent;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @author changfeng.chen@thingsx.com
 * @date 2024/7/8 18:38
 **/
@Component
public class MonoDeferEventListener {
    @Async
    @EventListener
    public void handle(MonoDeferEvent monoDeferEvent) throws InterruptedException {
        Thread.sleep(20000);
        System.out.println("handle event " + monoDeferEvent);
    }
}
